#!/usr/bin/python

import socket
import sys

class Proxy:
    def __init__(self, ip_address, port):
        self.ip = ip_address
        self.port = port
        self.last_access = None
        self.country = None
        self.provider = None
        self.status = None

class ProxyApp:
    
    def __init__(self):
        return
    
    def getCountryInfo(self,ip_address):
        return
    
    def try2Connect(self, proxy_obj):
        return
    
    def checkProxy(self,item_id):
        return
    
    def importProxyFromFile(self, file_path):
        return
    
    def addNewProxyItem(self,proxy_obj):
        return
    
    def deleteProxyItem(self,proxy_obj):
        return
    
    def updateProxyItem(self,proxy_obj):
        return

def isOpen(ip,port):
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        s.connect((ip, int(port)))
        s.shutdown(2)
        return True
    except:
        return False

def main():
    return

if __name__ == "__main__":
    main()
    
    